package com.android.jixin.channel.presenter.impl;

import android.app.Activity;

import com.android.jixin.channel.base.RetrofitService;
import com.android.jixin.channel.presenter.IRegisterPresenter;
import com.android.jixin.channel.presenter.IRegisterUserCompletePresenter;
import com.android.jixin.channel.ui.activity.RegisterActivity;
import com.android.jixin.channel.ui.activity.RegisterUserCompleteActivity;
import com.android.jixin.channel.view.IRegisterUserCompleteView;
import com.android.jixin.channel.view.IRegisterView;
import com.android.library.base.BasePresenter;
import com.android.library.util.StringUtils;

import javax.inject.Inject;

/**
 * Created by fitz on 2016/12/23.
 */

public class RegisterUserCompletePresenterImpl extends BasePresenter<IRegisterUserCompleteView> implements IRegisterUserCompletePresenter{

    private RetrofitService mService;
    private RegisterUserCompleteActivity mActivity;

    @Inject
    public RegisterUserCompletePresenterImpl(RetrofitService service, Activity activity){
        mService = service;
        mActivity = (RegisterUserCompleteActivity) activity;
    }

    @Override
    public void setEnable(String phone, String code) {
        mView.setSubmitEnable(!StringUtils.isEmpty(phone) && !StringUtils.isEmpty(code));
    }
}
